Skip to content

Refactor#2

Merged
Web-Dev-Codi merged 5 commits into
mainfrom
refactor
Feb 26, 2026
Merged

Refactor#2
Web-Dev-Codi merged 5 commits into
mainfrom
refactor

Conversation

@Web-Dev-Codi
Copy link
Copy Markdown
Owner

No description provided.

…ut truncation

- Added `ToolsConfig` to config.py with workspace_root, timeouts, and output limits
- Introduced `ToolRuntimeOptions` dataclass for runtime policy enforcement
- Extended `ToolRegistry` to support schema-first `ToolSpec` registration alongside callable tools
- Implemented `_validate_schema_arguments()` for constrained JSON schema validation (object/string/integer/number/boolean/array types)
- Added `_truncate_output()` helper
…rn and replace deprecated aliases

- Reordered imports across all modules to group standard library, third-party (textual/pydantic/structlog), and local package imports
- Replaced `asyncio.TimeoutError` with built-in `TimeoutError` in app.py file dialog functions
- Replaced `timezone.utc` with `UTC` constant in persistence.py
- Changed `getattr(response, "models")` to direct attribute access `response.models` in chat.py
- Moved
…wlist-based filtering

- Renamed `ollama_chat/tools.py` to `ollama_chat/tooling.py` to avoid naming conflict with standard library
- Updated all imports across app.py and test files to reference `tooling` module
- Introduced built-in tool adapter that exposes allowlisted subset of custom tools (`codesearch`, `edit`, `grep`, `list`, `read`) by default when `enable_custom_tools=False`
- Modified `build_registry()` to enable built-in adapter by default;
…ls with valid IDs

- Deleted `allow = {"codesearch", "edit", "grep", "list", "read"}` set from `to_specs()` method
- Changed tool filtering condition from `if not name or name not in allow:` to `if not name:` to accept any tool with a non-empty ID
- Removes allowlist-based filtering introduced in previous commit, enabling all discovered tools by default
…talog and usage examples

- Added "Function tools with Ollama (alpha/experimental)" subsection under Capabilities
- Documented dual tool format: JSON function tools from schema specs and Python callables for built-in integrations
- Added experimental warning about untested tools and potential truncation
- Cataloged all available tools organized by category (Files & search, Editing, Runtime, Planning & state, Introspection & utility
@Web-Dev-Codi Web-Dev-Codi merged commit 00492bb into main Feb 26, 2026
2 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant